package com.longyiqun.cm;

/**
 * program: CaseManager
 * package: com.longyiqun.cm
 * author: 龙轶群
 * create: 2018-04-26 20:43
 **/
public enum TestServer {

    CAIWU1("http://139.224.170.14/", "财务工作台", "1"),
    CAIWU2("http://101.132.163.225/", "财务工作台", "2"),
    CAIWU3("http://106.14.200.76/", "财务工作台", "3"),
    YEWU1("http://139.224.170.14/", "业务工作台", "1"),
    YEWU2("http://101.132.163.225/", "业务工作台", "2"),
    YEWU3("http://106.14.200.76/", "业务工作台", "3"),
    JINJIN1("http://47.100.220.102:8081/", "近近", "1"),
    FANFEI1("http://sit.jff/api/", "记返费", "1"),
    FANFEI2("http://139.224.170.14/", "记返费", "2"),
    FANFEI3("http://139.224.170.14/", "记返费", "3");



    // 成员变量
    private String url;
    private String model;
    private String env;

    // 构造方法
    TestServer(String url, String model, String env) {
        this.url = url;
        this.model = model;
        this.env = env;
    }

    // GET方法
    public String getUrl() {
        return url;
    }

    public String getModel() {
        return model;
    }

    public String getEnv() {
        return env;
    }

    // 根据model获取对应的URL
    public static String getURL(String model, String env) {
        for (TestServer server : values()) {
            if (server.model.equals(model) && server.env.equals(env)) {
                return server.url;
            }
        }
        return "";
    }
}